package model

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Username string
	Password string
	Roles    []Role `gorm:"many2many:user_role;"`
}

type Role struct {
	gorm.Model
	Name        string
	Users       []User       `gorm:"many2many:user_role;"`
	Permissions []Permission `gorm:"many2many:permission_role;"`
}

type Permission struct {
	gorm.Model
	Name  string
	Roles []Role `gorm:"many2many:permission_role;"`
}
